wayland: Avoid a crash with GtkGLArea
authorMatthias Clasen <mclasen@redhat.com>
Sun, 13 Sep 2015 18:18:19 +0000 (14:18 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 13 Sep 2015 19:56:30 +0000 (15:56 -0400)
We must not call gdk_wayland_window_attach_image when
using GL for drawing, this leads to a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=754770

gdk/wayland/gdkwindow-wayland.c

index d99975342269f142aaba94145734e30de57743ea..4c6f30ce3516ad76dba2075a7986a2cb44a9deaa 100644 (file)
@@ -1289,7 +1289,8 @@ gdk_wayland_window_show (GdkWindow *window,
 
   _gdk_make_event (window, GDK_MAP, NULL, FALSE);
 
-  if (impl->cairo_surface)
+  if (impl->cairo_surface &&
+      _gdk_wayland_is_shm_surface (impl->cairo_surface))
     gdk_wayland_window_attach_image (window);
 }